<?php

class RevistasController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        // action body
		$this->_helper->viewRenderer->setNoRender(true);
		$this->_helper->layout->disableLayout();
		return $this->_helper->redirector('lista','revistas');
    }

    public function listaAction()
    {
        // action body
		$this->view->headScript()->appendFile('/js/jquery.pajinate.js');
        $revistaObj = new Application_Model_Revista();
        $revistas = $revistaObj->getLast20();

        $this->view->revistas = $revistas;
		
		$obj_noticias = new Application_Model_Noticia();
		$noticias_footer = $obj_noticias->getLastLimit(2);
		$this->view->noticias_footer = $noticias_footer;
		
		$obj_videos = new Application_Model_Video();
		$video_footer = $obj_videos->getLastVideo();
		$this->view->video_footer = $video_footer[0];
		
		$obj_cartones = new Application_Model_Carton();
		$carton_footer = $obj_cartones->getLastCarton();
		$this->view->carton_footer = $carton_footer;
    }


}



